//
//  HomeQuicklyWayTableCell.m
//  DanaKreditLoan
//
//  Created by ZhengChengFeng on 2024/10/19.
//

#import "HomeQuicklyWayTableCell.h"

@implementation HomeQuicklyWayTableCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        
        self.icon = [[UIImageView alloc] init];
        [self.contentView addSubview:self.icon];
        [self.icon mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.contentView.mas_left).offset(15);
            make.top.equalTo(self.contentView.mas_top);
            make.bottom.equalTo(self.contentView.mas_bottom);
            make.right.equalTo(self.contentView.mas_right).offset(-15);
        }];
        
        self.icon.userInteractionEnabled = YES;
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(clickIcon)];
        [self.icon addGestureRecognizer:tap];
        
    }
    return self;
}

- (void)clickIcon{
    if (_clickIconBlock) {
        _clickIconBlock();
    } 
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
